﻿using System;
using System.Collections.Generic;
using ZyGames.DZPocker.Model;
using ZyGames.Framework.Cache.Generic;
using ZyGames.Framework.Game.Cache;
using ZyGames.Framework.Game.Context;
using ZyGames.Framework.Game.Contract;
using ZyGames.Framework.Game.Contract.Action;
using ZyGames.Framework.Game.Lang;
using ZyGames.Framework.Game.Service;
using System.Linq;
using ZyGames.DZPocker.Bll.Logic;
using ZyGames.DZPocker.Script;

namespace ZyGames.DZPocker.Script.CsScript.Action
{
	/// <summary>
	/// 广播弹出保险框
	/// </summary>
	public class Action30025 : BaseAction
	{
		private int _tableId;
		private int _time;//毫秒
		private string _insuranceModel;   //List<SimpleInsuranceModelPool>

		public Action30025(HttpGet actionGetter)
			: base((short)ActionType.DZShowInsurancePanle, actionGetter)
		{
		}
		public override bool GetUrlElement()
		{
			if (httpGet.GetInt("TableId", ref _tableId) &&
				httpGet.GetInt("Time", ref _time) &&
				httpGet.GetString("InsuranceModel", ref _insuranceModel))
			{
				return true;
			}
			return false;
		}

		public override bool TakeAction()
		{
			return true;
		}

		public override void BuildPacket()
		{
			this.PushIntoStack(this._tableId);
			this.PushIntoStack(this._time);
			this.PushIntoStack(this._insuranceModel);
		}
	}
}
